Skip to content

remove unnecessary moves from route handlers#581

Merged
yoshuawuyts merged 2 commits intohttp-rs:masterfrom
jbr:no-unnecessary-move
Jun 12, 2020
Merged

remove unnecessary moves from route handlers#581
yoshuawuyts merged 2 commits intohttp-rs:masterfrom
jbr:no-unnecessary-move

Conversation

@jbr
Copy link
Member

@jbr jbr commented Jun 10, 2020

Tide examples (and code, to the extent that it serves as an extended example) should use |_| async { … } instead of |_| async move { … } in circumstances where the request is unused. The compiler will let people know when they need to add the move, and |_| async move { Ok("hello") } throughout the examples encourages default use of unnecessary boilerplate.

@jbr jbr requested a review from yoshuawuyts June 10, 2020 21:33
@yoshuawuyts yoshuawuyts merged commit a26863a into http-rs:master Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants